package cn.zhuama.basic.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class AjaxResult {
    private boolean success=true;
    private String message;
    private Object data;



    public static AjaxResult me(){
        return new AjaxResult();
    }

    public AjaxResult setSuccess(boolean success){
        this.success = success;
        return this;
    }

    public AjaxResult setMessage(String message){
        this.message = message;
        return this;
    }
    public AjaxResult setData(Object data){
        this.data = data;
        return this;
    }

    public AjaxResult(boolean success, String message) {
        this.success = success;
        this.message = message;
    }
}
